#include<stdio.h>
void Swap(int* a, int* b)
{
	int tmp = *a;
	*a = *b;
	*b = tmp;
}
void My_Insertsort(int* arr,int sz)
{
	int p = 0;
	for (int i = 1; i < sz; i++)
	{
		if (arr[i] < arr[i - 1])
		{
			for (int j = i - 1; j >= 0; j--)
			{
				if (arr[j] > arr[j + 1])
				{
					Swap(&arr[j], &arr[j+1]);
				}
				else
				{
					break;
				}
			}
		}
	}
}


int main()
{
	int arr[] = { 2,4,1,6,7,2,10,22,44,0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	My_Insertsort(arr, sz);
	return 0;
}